﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using STX.Service;
using STX.Domain;
namespace STX.Admin.Controllers
{
    public class TabRoleController : BasePagesController<TabPermission, Models.BaseQueryModel>
    {
        public TabPermissionService TAB_RoleService { get; set; }
        public TabPermissionGroupService TAB_RoleGroupService { get; set; }

        #region override this controller's settting
        protected override BaseService<TabPermission> ThisService
        {
            get
            {
                return TAB_RoleService;
            }
        }
        #endregion

        public override void OnInit()
        {

        }

        public override ActionResult Add()
        {
            var query = TAB_RoleGroupService.FindAll();
            ViewData["GroupId"] = new SelectList(query, "id", "name", 0);
            return base.Add();
        }


    }
}
